package com.cloudcc.mobile.util;

import android.view.View;
import android.view.animation.Animation;
import android.view.animation.ScaleAnimation;

/**
 * 动画工具类
 * 
 * @author Administrator
 * 
 */
public class DongHuaUtils {
	// 图片放大在缩小
	public static void startScaleAnimationJavaCode(View v) {
		// Animation.RELATIVE_TO_SELF 动画相对于自身移动
		ScaleAnimation scaleAnim = new ScaleAnimation(1.0f, 1.5f, 1.0f, 1.5f,
				Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF,
				0.5f);
		scaleAnim.setDuration(500);
		scaleAnim.setFillAfter(false);
		v.startAnimation(scaleAnim);
	}

	// 图片放大在缩小
	public static void menuAdd(View v) {
		// Animation.RELATIVE_TO_SELF 动画相对于自身移动
		ScaleAnimation scaleAnim = new ScaleAnimation(1.0f, 1.5f, 1.0f, 1.5f,
				Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF,
				0.5f);
		scaleAnim.setDuration(500);
		scaleAnim.setFillAfter(false);
		v.startAnimation(scaleAnim);
	}
}
